<!-- 许运科 首页 --> 
<template>
 <div class="index h100">
    <main>
      <div class="topmain">
         <a class="top question">
            <img src="/img/Ke_img/我要咨询.png" alt="">
         </a>  
         <a class="top weituo">
            <img src="/img/Ke_img/打官司.png" alt="">
      </a>
      </div>
    <!--   <h1>{{list}}</h1> -->
      <h1 class="title">精选律师</h1>
      <div class="lawyer">
         <a class="news" v-for='item in list' :key='item.id'>
            <img :src="item.url" alt="">
            <div class="name">{{item.name}}</div>
            <p>{{item.lawyerIntroduction}}</p>
            <div class="list">
               <i>￥60</i><span><b>{{item.servePeopleNumber}}</b>人咨询</span>
            </div>
         </a>
      </div>
      
    </main>
 </div>
</template>

<script>
import { mapState,mapActions } from 'vuex'
export default {
   components:{
   },
   data(){
      return{
      }
   },
   created() {
     this.init();
  },
  computed: {
    ...mapState("ke", ["list"]),
  },
  methods: {
    ...mapActions("ke", ["init"]),
  },
}
</script>

<style scoped>
/* scoped 让样式只在当前组件生效  ！important(父子元素存在同样类名时用)*/
.index{
   display: flex;
   flex-direction: column;
   overflow: hidden;
}
header{
   width: 100%;
   margin: 0.24rem;
   margin-right: 0;
   display: flex;
   position: relative;
}
header a{
   font-size: .3rem;
   font-family: PingFang SC;
   font-weight: 400;
   color: #333333;
   line-height: .7rem;
}
header a img{
   margin-left: 0.1rem;
}
header input{
   width: 5.1rem;
   height: 0.7rem;
   padding-left:.61rem;
   font-size: .24rem;
   font-family: PingFang SC;
   font-weight: 400;
   color: #999999;
   margin-left: .31rem;
}
header img{
   width: 0.17rem;
   height: 0.17rem;
}
header .search{
   position: absolute;
   width:0.29rem;
   height: 0.29rem;
   left: 1.3rem;
   top: 0.23rem;
}
header .middleImg{
   position: absolute;
   width:0.04em;
   height: 0.38rem;
   right: 1.4rem;
   top: 0.23rem;
}
header .code{
   position: absolute;
   width:0.33rem;
   height: 0.32rem;
   right: 0.9rem;
   top:0.24rem;
}
.topmain{
   width:100%;
   height:2.8rem;
}
.top {
   width: 3.3rem;
   height: 2.8rem;
   float: left;
   margin-left: 0.23rem;
}
.question img{
   width: 3.4rem;
   height: 2.8rem;
}
.weituo img{
   margin-top: .1rem;
   width: 3.94rem;
   height: 2.49rem;
}

/* 导航页 */
.nav{
   position: relative;
   left: 0;
   top: -.3rem;
   width: 100%;
   display: flex;
   justify-content: space-around;
   flex-wrap: wrap;
   flex-direction: row
}
.nav a{
   position: relative;
   text-align: center;
   width: 1.12rem;
   margin: .1rem;
}
.nav a img{
   width: 1.12rem;
   height: 1.12rem;
   display: block;
   margin: 0 auto;
}
.nav a p{
   position: absolute;
   left: 0;
   bottom: -0.2rem;
   font-size: .24rem;
   font-family: PingFang SC;
   font-weight: 400;
   color: #333333;
}
.title{
   margin-left:0.23rem;
   font-size: .32rem;
   font-family: PingFang SC;
   font-weight: 600;
   color: #333333;
}
/* 律师信息页 */
.lawyer{
   width: 100%;
   display: flex;
   justify-content: space-around;
   flex-wrap: wrap;
}
.lawyer a{
   margin: 0 .1rem;
   width:3.32rem;
   height: 2.7rem;
   position: relative;
}
.lawyer a img{
   width: 3.32rem;
   height: 1.66rem;
}
.lawyer a .name{
   width: 3.1rem;
   position: absolute;
   left: 0rem;
   top: 1.21rem;
   padding-left: .2rem;
   background-color: rgba(128, 128, 128, 0.5);
}
.lawyer a p{
   font-size: .2rem;
   margin-left: .1rem;
}
.lawyer a .list{
   height: 0.4rem;
   line-height: 0.4rem;
}
.lawyer a .list span b{
   font-weight: normal;
}
.lawyer a .list span{   
   float: right;
   font-weight: lighter;
   color: #999999;
   font-size: .1rem;
 /*   line-height: .3rem; */
}
.lawyer a .list i{
   color: red;
   margin-left: .1rem;
}
</style>